<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/3/30
  Time: 16:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户管理</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body style="width: 80%;margin: auto">

<table class="table table-hover">
    欢迎[
    <div>${redisname}</div>
    ]登陆餐饮后台页面
    <caption><a href="/loginUpdate">新增用户</a></caption>
    <thead>
    <tr>
        <th>ID</th>
        <th>用户名</th>
        <th>密码</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${list}" var="user">
        <tr>
            <td>${user.id}</td>
            <td>${user.username}</td>
            <td>${user.password}</td>
            <td>
                <a href="loginUpdate?id=${user.id}"> 修改</a>
                <a href="loginDelete?id=${user.id}"> 删除</a>
            </td>
        </tr>
    </c:forEach>


    </tbody>
</table>
<div>
    <%--    a标签默认get方法--%>
    总条数 ${map.get("count")}条&nbsp;&nbsp;
    共${map.get("countPage")}页&nbsp;&nbsp;

    <a href="/seleteAll?type=1&dangqianye=${map.get('dangqianye')}">首页</a>
    <a href="/seleteAll?type=2&dangqianye=${map.get('dangqianye')}">上一页</a>
    <a href="/seleteAll?type=3&dangqianye=${map.get('dangqianye')}">下一页</a>
    <a href="/seleteAll?type=4&dangqianye=${map.get('dangqianye')}">末页</a>
    <form action="/seleteAll">
        每一页显示 <input type="text" name="pageSize" value="${map.get('pageSize')}"> 条
        跳转到<input type="text" name="dangqianye" value="${map.get('dangqianye')}">页
        <input type="submit" value="确定">
    </form>
</div>
</body>
</html>
